
package Navigation;

import AStar.AStarNode;

class CrossingTopologyObjectImpl implements ICrossingTopObj{
	
	private int ID;
	private CoordinateTopologyObjectImpl coordinate;
	
    public CrossingTopologyObjectImpl(String content) {
    	if(content != null){
    		parseCrossing(content);
    	}
    }
        
    private void parseCrossing(String content){
    	String[] str = content.split(" ");
    	this.ID = Integer.parseInt(str[0]);
    	double x = Double.parseDouble(str[1]);
    	double y = Double.parseDouble(str[2]);
    	coordinate = new CoordinateTopologyObjectImpl(x, y);
    }

    public String write() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
    public ITopologyObject getCoordinate() {
    	return coordinate;
    }
    
    public int getID(){
    	return ID;
    }

	@Override
	public int getF() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void setF(int f) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public int getG() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void setG(int g) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public AStarNode getPreviousNode() {
		// TODO Auto-generated method stub
		return null;
	}
}
